﻿@model dynamic
@{
    ViewBag.Title = "Index";
}
@section LayoutHeadContainer{
<script>
    $(function () {
        $("#tabs").tabs();
        $(".btn").button();
    });
</script>
}
<div id="middle-sdo1">
  <div id="middle">
    <!--Message-->
    <div class="message">北京电力工程公司成果库系统欢迎您！</div>
    <!--Feature Box-->
    <div style="text-align:right;padding-bottom:5px">
    
    </div>
    <div id="tabs" style=" text-align:center">
	    <ul>
		    <li><a href="#tabs-1">系统备份</a></li>
            <li><a href="#tabs-2">在线人数设置</a></li>
	    </ul>
	    <div id="tabs-1" style="text-align:center; margin-left:auto;">
        @using (Html.BeginForm("Backup", "Setting", FormMethod.Post, new { id = "form1", onsubmit = "return checkempty()" }))
        {
            <table width="700px" style="margin-left:auto; margin-right:auto; line-height:40px">
                <tr>
                    <td style="text-align:right;">
                        <h5>备份路径：</h5>
                    </td>
                    <td style="text-align:left;">
                        @Model.BackupPath
                        @Html.Hidden("backupPath", (string)Model.BackupPath)
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right;">
                        <h5>剩余空间：</h5>
                    </td>
                    <td style="text-align:left;">
                        剩余 @Model.FreeSpace GB空间
                    </td>
                </tr>
            </table>
        if (!string.IsNullOrEmpty(Model.ProcessName))
        {
            <button id="button1" onclick="$('#form1').submit()" class="btn" disabled="disabled">备份中，请稍等！</button>
        }
        else
        {
            <button id="button1" onclick="$('#form1').submit()" class="btn">备份</button>
        }
        }
        </div>
        <div id="tabs-2" style="text-align:center; margin-left:auto;">
        @using (Html.BeginForm("SetUserBaseCount", "Setting", FormMethod.Post, new { id = "form2", onsubmit = "return checkempty()" }))
        {
            <table width="700px" style="margin-left:auto; margin-right:auto; line-height:40px">
                <tr>
                    <td style="text-align:right;">
                        <h5>在线人数基础值：</h5>
                    </td>
                    <td style="text-align:left;">
                        @Html.TextBox("txtbaseonline", (long)Model.UserBaseCount)
                    </td>
                </tr>
            </table>
            <button id="button2" onclick="$('#form2').submit()" class="btn">设置</button>
        }
        </div>
        
        <br />
        <br />
        <br />
    </div>
    
  </div>
</div>